package com.chenwut.algorithmQuestion;

public class Question_3 {
    public static void main(String[] args) {
        int sum = getCount(20);
        System.out.println(sum);
    }
    public static int getCount(int n) {
        if (n <= 2) {
            return n;
        } else if (n == 3) {
            return 4;
        } else {
            return getCount(n - 1) + getCount(n - 2) + getCount(n - 3);
        }
    }
}





